import {
  getAssociationServerListApi,
  getAssociationServerAddApi,
  getAgencyListApi,
  getInstitutionListApi,
  getInstitutionUnitApi,
  getInstEvaluationsListApi,
  getAssocEvaluationsServerApi,
  getInstEvaluationsListApis,
  getInstEvaluationsInfoApis,
} from "@/api/evaluate.js";

const evaluate = {
  state: {},
  mutations: {},
  actions: {
    getAssociationServerList({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getAssociationServerListApi(obj, function (data) {
          resolve(data);
        });
      });
    },
    getAssociationServerAdd({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getAssociationServerAddApi(obj, function (data) {
          resolve(data);
        });
      });
    },
    getAgencyList({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getAgencyListApi(obj, function (data) {
          resolve(data);
        });
      });
    },
    getInstitutionList({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getInstitutionListApi(obj, function (data) {
          resolve(data);
        });
      });
    },
    getInstitutionUnit({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getInstitutionUnitApi(obj, function (data) {
          resolve(data);
        });
      });
    },

    getInstEvaluationsList({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getInstEvaluationsListApi(obj, function (data) {
          resolve(data);
        });
      });
    },
    getAssocEvaluationsServer({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getAssocEvaluationsServerApi(obj, function (data) {
          resolve(data);
        });
      });
    },
    getInstEvaluationsLists({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getInstEvaluationsListApis(obj, function (data) {
          resolve(data);
        });
      });
    },
    getInstEvaluationsInfo({ commit }, obj) {
      return new Promise((resolve, reject) => {
        getInstEvaluationsInfoApis(obj, function (data) {
          resolve(data);
        });
      });
    },
  },
};

export default evaluate;
